<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 <%@page import="web.Start" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Trends visualization API</title>
  <script type="text/javascript" src="http://api.simile-widgets.org/timeplot/1.1/timeplot-api.js"></script>
  <script type="text/javascript">
  function onLoad() {
	  var eventSource = new Timeplot.DefaultEventSource();
	  var plotInfo = [
	    Timeplot.createPlotInfo({
	      id: "plot1",
	      dataSource: new Timeplot.ColumnSource(eventSource,1)
	    })
	  ];
	  
	  timeplot = Timeplot.create(document.getElementById("my-timeplot"), plotInfo);
	  timeplot.loadText("C:\Users\Gary Benattar\workspace\GTrend\Txt\anyone.txt", ",", eventSource);
	}

	var resizeTimerID = null;
	function onResize() {
	    if (resizeTimerID == null) {
	        resizeTimerID = window.setTimeout(function() {
	            resizeTimerID = null;
	            timeplot.repaint();
	        }, 100);
	    }
	}
	 var timeGeometry = new Timeplot.DefaultTimeGeometry({
		    gridColor: new Timeplot.Color("#000000"),
		    axisLabelsPlacement: "top"
		  });

		  var valueGeometry = new Timeplot.DefaultValueGeometry({
		    gridColor: "#000000",
		    min: 0,
		    max: 100
		  });

		  var plotInfo = [
		    Timeplot.createPlotInfo({
		      id: "plot1",
		      dataSource: new Timeplot.ColumnSource(eventSource,1),
		      timeGeometry: timeGeometry,
		      valueGeometry: valueGeometry,
		      lineColor: "#ff0000",
		      fillColor: "#cc8080",
		      showValues: true
		    }),
		    Timeplot.createPlotInfo({
		      id: "plot2",
		      dataSource: new Timeplot.ColumnSource(eventSource,3),
		      timeGeometry: timeGeometry,
		      valueGeometry: valueGeometry,
		      lineColor: "#D0A825",
		      showValues: true
		    })
		  ];
  </script>
</head>
 <body onload="onLoad();" onresize="onResize();">
<div id="my-timeplot" style="height: 150px;"></div>
</body>
</html>